//
//  homeSouYeViewController.m
//  WWSideslipViewControllerSample
//
//  Created by 潘东 on 15/7/12.
//  Copyright (c) 2015年 wangwei. All rights reserved.
//

#import "homeSouYeViewController.h"
#import "shouYeTableViewCell.h"

@interface homeSouYeViewController () <UITableViewDelegate, UITableViewDataSource>
@property (nonatomic, retain) UITableView *table;
@property (nonatomic, retain) NSMutableArray *arr;

@end

@implementation homeSouYeViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.view.backgroundColor = [UIColor whiteColor];
    self.title = @"物语";
    
    UIColor * color = [UIColor colorWithRed:18 / 255.0 green:31 / 255.0 blue:48 / 255.0 alpha:1];
    NSDictionary * dict=[NSDictionary dictionaryWithObject:color forKey:UITextAttributeTextColor];
    self.navigationController.navigationBar.titleTextAttributes = dict;

    self.navigationController.navigationBar.translucent = NO;
    self.table = [[UITableView alloc] initWithFrame:self.view.bounds];
    self.table.delegate = self;
    self.table.dataSource = self;
    self.table.separatorStyle = NO;
    [self.view addSubview:self.table];
    self.arr = [@[@"1", @"2"] mutableCopy];
    
    
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
    return self.arr.count;
    
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
    shouYeTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"shouye"];
    if (!cell) {
        cell = [[shouYeTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"shouye"];
    }
    if (indexPath.row == 0) {
        cell.bigImage.image = [UIImage imageNamed:@"test.jpg"];
        cell.titeLable.text = @"巨蟹月\n送给姑娘们的奇妙生日礼";
        cell.xingXingimg.image = [UIImage imageNamed:@"iconfont-xin (1)"];
        cell.dzLable.text = @"345";
    } else {
        cell.bigImage.image = [UIImage imageNamed:@"test2.jpg"];
        cell.titeLable.text = @"有一种清新优雅叫 Zakka";
        cell.xingXingimg.image = [UIImage imageNamed:@"iconfont-xin (1)"];
        cell.dzLable.text = @"6";
    }
    
    return cell;
}
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{
    return 200;
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
